#include<iostream>
#include<cstring>
#include<queue>
#include<vector>
using namespace std;
int a,b,c;
string mv[] = {"FILL(1)","FILL(2)","DROP(1)","DROP(2)","POUR(1,2)","POUR(2,1)"};
//定义两桶状态的数据结构
typedef struct node{
	int a,b;//定义状态
	int step;//定义步数
	vector<string> op;//存储操作
}node;
int vis[1000][1000];

void bfs(){
	queue<node> q;
	q.push({0,0,0});
	while(!q.empty()){
		node head = q.front();
		q.pop();
		//判断是否满足条件，满足条件就结束
		if(head.a == c || head.b == c){
			cout << head.step << "\n";
			int len = head.op.size();
			for(int i = 0;i < head.step;i++){
				cout << head.op[i] << "\n";
			}
			return ;
		}
		//开始搜索
		for(int i = 0;i < 6;i++){
			int aa = head.a;
			int bb = head.b;
			if(i == 0){
				aa = a;
			}
			if(i == 1){
				bb = b;
			}
			if(i == 2){
				aa = 0;
			}
			if(i == 3){
				bb = 0;
			}
			if(i == 4){
				aa = max(head.a - (b - head.b),0);
				bb = min(b,head.b + head.a);
			}
			if(i == 5){
				bb = max(head.b - (a - head.a),0);
				aa = min(a,head.a + head.b);
			}
			//访问过的状态
			if(vis[aa][bb]) continue;
			vis[aa][bb] = 1;
			node temp;
			temp.a = aa,temp.b = bb,temp.step = head.step + 1;
			temp.op = head.op;
			temp.op.push_back(mv[i]);
			q.push(temp);
		}
	}
	cout << "impossible" << "\n";
}
int main(){
	cin >> a >> b >> c;
	bfs();
}